describe('practice-4-3', function () {

    it("求歌星的最终成绩", function () {
        var arr_score_temp = [98,67,87,75,90,80,85,81,82,92];
        var arr_temp_release = [87,75,90,80,85,81,82,92];
        expect(get_last_star_grand(arr_score_temp)).toBe(get_eight_average(arr_temp_release));

        var arr_all_score = [98,67,87,85,90,90,89,81,82,92];
        var arr_all_release = [87,85,90,90,89,81,82,92];
        expect(get_last_star_grand(arr_all_score)).toBe(get_eight_average(arr_all_release));


    });

});
function get_eight_average(array)
{
    var sum_score = 0;
    for(var i = 0; i < array.length; i ++)
    {
        sum_score += array[i];
    }
    return sum_score/8;
}